import os
from multiprocessing import Process
def run_proc(name):
  print("子进程%s的ID是:%s"%(name,os.getpid()))
if __name__ == '__main__':
  print("当前进程(父进程)的ID是：%s"%os.getpid())
  p=Process(target=run_proc,args=('test',))
  p.start()
  p.join()
  print("子进程结束,回到主进程%s"%os.getpid())